@extends('Admin.layout.layout')
@section('title','门户管理')
@section('home','新闻管理')
@section('weizhi','添加')
@section('con')

<script type="text/javascript" charset="utf-8" src="{{asset('/bootcss/UTF/ueditor.config.js')}}"></script>
<script type="text/javascript" charset="utf-8" src="{{asset('/bootcss/UTF/ueditor.all.min.js')}}"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="{{asset('/bootcss/UTF/lang/zh-cn/zh-cn.js')}}"></script>

<form class="form-horizontal " method="post" action="{{url('/admin/portalpost/insert')}}" enctype="multipart/form-data">
            {{csrf_field()}}
    
    <div class="form-group" style="height:auto;">
        <!-- <label class="control-label col-lg-2" for="inputSuccess"></label> -->
        <div class="col-lg-10" style='height:auto'>
            <input class="form-control input-lg m-bot15" placeholder="新闻标题" type="text" name="title" >
            <input class="form-control input-lg m-bot15" placeholder="关键字" type="text" name="keywords">
            <input class="form-control input-lg m-bot15" placeholder="涉及药材" type="text" name="mname">
            <input class="form-control input-lg m-bot15" type="text" name="ctime" value="{{date('Y-m-d',time())}}">
            <input class="form-control input-lg m-bot15" placeholder="发表人" type="text" name="uname">             

            <select class="form-control input-lg m-bot15" name="tid">
                @foreach($types as $key=>$value)
                <option value="{{$value->id}}">{{$value->name}}</option>
                
                @endforeach
            </select>

            <p class="help-block">上传图片</p>
            <input id="exampleInputFile" type="file" name="img">
            <p>内容简介</p>
            <textarea class="form-control" name="summary" style="width: 943px; height: 72px;"></textarea> 
            
            <div>
                
                <script id="editor" type="text/plain" style="display:block;width:100%;height:500px; max-height: 500px" name="content"></script>
                <script>
                    var ue = UE.getEditor('editor');
                </script>
            </div>
            <button type="submit" class="btn btn-primary">提交</button>
            

        </div>
    </div>
</form>

@endsection